package utils;

public class DBG {

	public static boolean debug = false;
	public static int fps;
	public static int cFps;
	public static long bftime;
	public static long ctime;

	public static void showMsg(String msg, Object clase) {
		if (debug)
			System.out.println("[" + clase.getClass().getName() + "] " + msg);
	}

	public static int registerFrame() {
		ctime = System.currentTimeMillis();
		// System.out.println(timen);
		if (ctime - bftime > 1000) {
			bftime = ctime;
			cFps = fps;

			fps = 0;
		} else {
			fps++;
		}
		return cFps;
	}

	public static void log(String logString) {
		if (debug == true) {
			System.out.println(logString);
		}
	}
}
